package com.joe.networkdisk.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * RefreshScope   SpringCloud 原生注解 支持 Nacos 的动态刷新功能
 *
 * @author ckh
 * @since 2020/11/25 2:43 PM
 */
@RestController
@RefreshScope
public class TestController {

    @Value("${ckh.test}")
    private String configInfo;

    @GetMapping("/config/info")
    public String getConfigInfo() {
        return configInfo;
    }
}
